import java.util.Random;
import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int input = 0;
        Random random = new Random();
        int count = random.nextInt(100);
        while(true)
        {
            System.out.println("请输入你要猜的数字:>");
            input = sc.nextInt();
            if(input > count) {
                System.out.println("猜大了！");
            }else if(input < count) {
                System.out.println("猜小了！");
            }else {
                System.out.println("恭喜你猜对了！");
                break;
            }
        }
    }

    public static void main4(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        hanIo(n,'A','B','C');
    }

    public static void move(char pos1,char pos2) {
        System.out.print(" " + pos1 + "->" + pos2 + " ");
    }

    public static void hanIo(int n,char pos1,char pos2,char pos3) {
        if(n == 1) {
            System.out.print(" " + pos1 + "->" + pos3 + " ");
        }else {
            hanIo(n-1,pos1,pos3,pos2);
            move(pos1,pos3);
            hanIo(n-1,pos2,pos1,pos3);
        }
    }





    public static void main16(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        for (int i = 1; i <= n; i++) {
           sum += kramp(i);
        }
        System.out.println(sum);
    }


    public static void main15(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int q = sc.nextInt();
        System.out.println(findMax(m, n));
        System.out.println("**************");
        System.out.println(findMax(m, n, q));
    }

    public static int findMax(int a,int b) {
        return a > b ? a : b;
    }

    public static int findMax(int a,int b,int c) {
        int n = a > b ? a : b;
        return n > c ? n : c;
    }

    public static void main14(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(sum(n));
    }

    public static int sum(int n) {
        if(n == 1) {
            return n;
        }else {
            return n + sum(n-1);
        }
    }
    public static void main13(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(kramp(n));
    }

    public static int kramp(int n) {
        if(n==1) {
            return 1;
        }else {
            return n * kramp(n-1);
        }
    }
    public static void main12(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = 1;
        int b = 1;
        int c = 0;
        if(n==1 || n==2) {
            System.out.println(a);
        }else {
            for (int i = 0; i < n-2; i++) {
                c = a + b;
                a = b;
                b = c;
            }
            System.out.println(c);
        }
    }
    public static void main11(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        System.out.println(sum(num));
    }
//    public static int sum(int num) {
//        if(num<10) {
//           return num;
//        }else {
//           return num%10 + sum(num/10);
//        }
//    }
    public static void main10(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        number(num);
    }

    public static void number(int num) {
        if(num<10) {
            System.out.print(num + " ");
        }else {
            int m = num % 10;
            number(num/10);
            System.out.print(m + " ");
        }
    }
    public static void main8(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        while(num!=0) {
            System.out.print(num%10 + " ");
            num /= 10;
        }
    }
    public static void main7(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        for (int i = 1; i < 32; i=i+2) {
            int m = (num>>i) & 1;
            System.out.print(m + " ");
        }
        System.out.println();
        for (int i =0 ; i < 32; i=i+2) {
            int m = (num>>i) & 1;
            System.out.print(m + " ");
        }
    }
    public static void main6(String[] args) {
        String str = "abcdef";
        String str2;
        int count = 3;
        Scanner sc = new Scanner(System.in);
        while(count != 0) {
            System.out.println("请输入你的密码:>");
            str2 = sc.nextLine();
            if(str.equals(str2)) {
                break;
            }else {
                count--;
                System.out.println("密码错误,你还剩" + count + "次机会!");
            }
        }
        if(count!=0) {
            System.out.println("密码正确!");
        }else {
            System.out.println("由于你多次输入错误,你的账号已被冻结！");
        }
    }
    public static void main5(String[] args) {
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5; j++) {
                if(i == j) {
                    System.out.print("*" + " ");
                }else if(i + j == 4) {
                    System.out.print("*" + " ");
                }else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }
    }
    public static void main3(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        int count = 0;
        for (int i = 0; i < m; i++) {
            int sum = 0;
            int n = i;
            count = Count(i);
            for (int j = 0; j < count; j++) {
                sum += Math.pow(n%10,count);
                n /= 10;
            }
            if(sum == i){
                System.out.println(i + " ");
            }
        }
        System.out.println();
    }

    public static int Count(int x){
        int count = 0;
        while(x!=0)
        {
            x = x / 10;
            count++;
        }
        return count;
    }
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        boolean flag = true;
        for(int i = 2;i<=Math.sqrt(m);i++){
            if(m%i==0){
                flag = false;
            }
        }
        if(flag){
            System.out.println(m + "是素数!");
        }else{
            System.out.println(m + "不是素数！");
        }
    }
    public static void main1(String[] args) {
        int count = 0;
        for (int i = 1; i < 100; i++) {
            if(i%10==9){
                count++;
            }
            if(i/10==9){
                count++;
            }
        }
        System.out.println(count);
    }
}
